home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / applications / 950 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. Path: goliath.apana.org.au!amioz!perrym
  2. From: perrym@amioz.apana.org.au (Perry Mowbray)
  3. Message-ID: <30ffc7dc@amioz.apana.org.au>
  4. Newsgroups: comp.sys.amiga.applications
  5. X-FTN-To: Adrian Maggs
  6. Subject: Re: Pagestream/GoldED script?
  7. Date: 19 Jan 96 10:33:32 GMT
  8. Organization: AmiOZ BBS Australia <UUCP<->Fido gateway>
  9. X-GateSoftware: AmiGate 1.3a (24.3.95)
  10.  
  11. In a message of 16 Jan 96 Adrian Maggs wrote to All:
  12.  
  13.  AM> Has anyone written a SendtoGoldED script for Pagestream3?
  14.  
  15. No
  16.  
  17.  AM> I've got the default SendtoPageliner and SendtoTTX, but I don't use
  18.  AM> TTX, and Pageliner, IMHO, isn't as good as GoldED.
  19.  
  20. True. But initially the problem I'd see are the endoflines that Golded would stick into it? That is, when loaded the lines would be however characters wide Goldeds limit is! The neat thing about PageLiner is that it wraps within the window without adding EOLs.
  21.  
  22. But try changing the script to following lines:
  23.  
  24. gepath='GoldEd:GoldEd'
  25. preffile='PageStream3:SendtoGoldEd.prefs'
  26.  
  27. if ~exists(gepath) then do
  28.    if open(.ifile, preffile, 'R') then do
  29.      gepath=readln(.ifile)
  30.      call close(.ifile)
  31.      askuser='no'
  32.      end
  33.    else do
  34.      askuser='yes'
  35.      end
  36.    if ~exists(gepath) | askuser='yes' then do
  37.       getfile TITLE "'Please locate GoldEd'" load path "'Sys:'" file 'GoldEd' posbutton 'Ok' negbutton 'Cancel'
  38.       if RC=10 then signal cancel
  39.       gepath=result
  40.       if open(.ifile, preffile, 'W') then do
  41.         call writeln(.ifile, gepath)
  42.         call close(.ifile)
  43.         end
  44.     end
  45. end
  46.  
  47. ADDRESS COMMAND
  48. 'run >nil:' gepath
  49.  
  50. do 20
  51.     if ~show(P, 'GOLDED.1') then call delay(50) end
  52.  
  53. /* If the ARexx port didn't show up, alert the user and exit */ if ~show(P, 'GOLDED.1') then do
  54.     ADDRESS 'PAGESTREAM'
  55.     allocarexxrequester '"Send to Editor Error!"' 368 59
  56.     reqhandle=result
  57.     addarexxgadget reqhandle EXIT 286 42 70 label "_Exit"
  58.         Exithandle=result
  59.     addarexxgadget reqhandle TEXT 8 10 352 border none string "'GoldEd could not be started.'"
  60.     doarexxrequester reqhandle
  61.     freearexxrequester reqhandle
  62.     'refresh continue'
  63.     'lockinterface false'
  64.     EXIT
  65. end
  66.  
  67. ADDRESS 'GOLDED.1'
  68. 'open t:GoldEdText SMART RAW'
  69. 'cursor down'
  70.  
  71. /* Wait for the user to finish in PageLiner */ do forever
  72.     if show(P, 'GOLDED.1') then do
  73.         'getarticle t:hotlinkedarticle'
  74.         if rc=0 then call delay(50)
  75.         else signal update
  76.     end
  77.     else signal update
  78. end
  79.  
  80. /* Update PageStream and exit */
  81. UPDATE:
  82. ADDRESS 'PAGESTREAM'
  83. 'screentofront'
  84. 'revealwindow current'
  85.  
  86. 'inserttext file t:GoldEdText filter ascii textcode PageStream'
  87.  
  88. /* deselect the text if rquired */
  89. if sID=eID then selecttext none
  90.  
  91. signal cancel
  92.  
  93. CANCEL:
  94. ADDRESS 'PAGESTREAM'
  95. 'refresh continue'
  96. 'lockinterface false'
  97. ADDRESS COMMAND
  98. 'delete t:GoldEdText >NIL:'
  99. EXIT
  100.  
  101. Don't know if that helps?
  102.  
  103. ************************************************************************** Perry Mowbray
  104. Email: perrym@amioz.apana.org.au
  105. FIDO: 3:713/817.7
  106. AmigaNet: 41:200/817.7
  107. **************************************************************************
  108.  
  109.  
  110.